﻿@model FriendAD.Core.Info

@{
    Layout = null;
}
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="dns-prefetch" href="//res.wx.qq.com">
    <link rel="dns-prefetch" href="//mmbiz.qpic.cn">
    <link rel="shortcut icon" type="image/x-icon" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/favicon22c41b.ico">
    <link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve2c9cd6.css">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <title>@Model.Title</title>
    <link href="~/Content/css_view.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="http://cdn.amazeui.org/amazeui/2.5.0/css/amazeui.min.css" />

    @Scripts.Render("~/bundles/jquery")
    <script>
        $(function () {
            var pattern = /^http:\/\/mmbiz/;
            //var prefix = 'http://img01.store.sogou.com/net/a/04/link?appid=100520029&url=';
            var prefix = '@Url.Action("img","home")?url=';
            $("img").each(function () {
                var src = $(this).attr('src');
                if (pattern.test(src)) {
                    var newsrc = prefix + src;
                    $(this).attr('src', newsrc);
                }
            });

            var voteurl = 'http://mp.weixin.qq.com'
            $(".vote_iframe").each(function () {
                var src = $(this).attr('src');
                $(this).attr('src', voteurl + src);
            })
        });
        setInterval(function () {
            var dd = document.getElementById('topad').style.display;
            if (dd == "none") {
                document.getElementById('topad').style.display = 'block';
            }
        }, 4000);//界面加载四十秒后执行弹出。
        //
        setInterval(function () {
            var dd = document.getElementById('bannerDowm').style.display;
            if (dd == "none") {
                document.getElementById('bannerDowm').style.display = 'block';
            }
        }, 4000);//界面加载四十秒后执行弹出。
        function menuFixed(id) {
            var obj = document.getElementById(id);
            var _getHeight = obj.offsetTop;

            window.onscroll = function () {
                changePos(id, _getHeight);
            }
        }
        function changePos(id, height) {
            var obj = document.getElementById(id);
            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
            if (scrollTop < height) {
                obj.style.position = 'relative';
            } else {
                obj.style.position = 'fixed';
                obj.style.top = '0';
            }
        }
        window.onload = function () {
            menuFixed('topad');
        }
        $(function () {


            $(".rich_media_meta_list span:first").css("display", "none");
        });
    </script>
    <style>
        .topad {
            margin: 0 auto;
            left: 0;
            right: 0;
            position: relative;
            width: 100%;
            max-width: 650px;
            text-align: right;
        }
        /*.topad img{ width:100%;max-width:650px;}*/
        .teltopimg {
            width: 10%;
            max-width: 80px;
            min-width: 50px;
        }

        .telimg {
            width: 10%;
            max-width: 80px;
            min-width: 50px;
        }

        .app-guide1 {
            position: fixed;
            bottom: 0px;
            left: 0;
            right: 0;
            width: 100%;
            max-width: 650px;
            margin: 0 auto;
            background-color: rgba(0,0,0,0);
            /*box-shadow:0 -1px 1px rgba(0,0,0,.10);*/
            z-index: 99999999999999999;
        }

            .app-guide1 .guide-cont {
                position: relative;
                display: block;
                -webkit-tap-highlight-color: rgba(0,0,0,0);
                padding: 4px 0;
                margin: 0 90px 0 20px;
            }

                .app-guide1 .guide-cont.touch::before {
                    content: "";
                    width: 100%;
                    height: 100%;
                    background-color: rgba(0,0,0,.06);
                    position: absolute;
                    top: 0;
                    left: -20px;
                    padding: 0 90px 0 20px;
                }

            .app-guide1 .guide-logo {
                float: left;
                width: 42px;
                height: 42px;
                vertical-align: top;
                margin-right: 8px;
            }

            .app-guide1 .guide-slogon, .app-guide1 .guide-dc {
                color: #fff;
                font-size: 16px;
                line-height: 20px;
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
            }

                .app-guide1 .guide-slogon span {
                    color: #fff;
                    font-size: 16px;
                    line-height: 20px;
                    margin-right: 6px;
                }

                    .app-guide1 .guide-slogon span:last-of-type {
                        margin-right: 0;
                    }

            .app-guide1 .guide-dc {
                color: #ccc;
                font-size: 14px;
                line-height: 22px;
            }

            .app-guide1 .guide-btn {
                position: absolute;
                top: 10px;
                right: 10px;
                width: 80px;
                height: 30px;
                background-color: #62af01;
                border: 0 none;
                border-radius: 3px;
                color: #fff;
                font: 14px/30px microsoft yahei,helvetica,arial,sans-serif;
                text-align: center;
                padding: 0;
            }

                .app-guide1 .guide-btn.touch {
                    background-color: #529301;
                }

        .guide-close {
            position: absolute;
            top: 10%;
            right: 0;
            width: 20px;
            height: 20px;
            line-height: 999em;
            overflow: hidden;
        }

            .guide-close::before {
                content: "";
                position: absolute;
                left: 3px;
                bottom: 2px;
                width: 28px;
                height: 28px;
                background-color: #262626;
                border-radius: 28px;
            }

            .guide-close::after {
                content: "";
                position: absolute;
                top: 4px;
                right: 2px;
                width: 9px;
                height: 9px;
                background: url(images/640.png) no-repeat 0 0;
                -webkit-background-size: 9px auto;
                background-size: 9px auto;
            }

        .guide-fixed .footer {
            padding-bottom: 65px;
        }
    </style>
</head>
<body id="activity-detail" class="zh_CN " style="margin-top:10px">

    <div class="rich_media ">
        <div class="rich_media_inner">
            <h2 class="rich_media_title" id="activity-name">@Model.Title</h2>
            @{
                    //公众号显示状态
                    if (Model.wechatStatus == 1)
                    {
                    <div class="rich_media_meta_list">
                        @Html.Raw(Model.wechatID)
                    </div>
            }
            }
                @if (Model.location == 1)//广告位置判断
                {
                    <div class="topad" id="topad" style="display:block">
                        <a href="@Url.Action("goto", new { id=Model.ID})"><img src="@Model.Ad.Img" style="width:100%;max-height:100px;"></a>
                        @Model.Ad.tell
                    </div>
                }
            <div id="page-content">
                <div id="img-content">
                    <div class="rich_media_content" id="js_content">
                        @Html.Raw(Model.Content)
                    </div>
                    <div class="rich_media_tool" id="js_toobar3"></div>
                    @*二维码*@
                    <div style="text-align:center; margin-top:50px;">
                        <img src="@Model.Ad.Qrcode" border="0" />
                    </div>

                    <a name="weixin"></a>
                </div>
            </div>
        </div>
    </div>
    <br>
    @{
        if (Model.location == 0)
        {

            <div class="app-guide1 adweix" id="bannerDowm" style="display:block">
                <div class="am-text-right">
                    <a href="tel:@Model.Ad.tell" class="am-icon-btn am-success" style="width: 35px;height: 35px;padding-top: 5px;"><i class="am-icon-phone"></i></a>
                </div>
                <a href="@Url.Action("goto", new { id=Model.ID})"><img src="@Model.Ad.Img" style="width:100%; max-height:100px;"></a>
            </div>
        }
    }
</body>
</html>